<div class="modal-header">
    <button aria-hidden="true" data-dismiss="modal" class="close" type="button"></button>
    <h3>选择商品</h3>
</div>
<div class="modal-body">
    <div class="well">
        <form class="form-horizontal ajaxGoodsSearch">
            <span>商品编号或商品名称 <input type="text" name="goods_search" value="<?php echo $this->input->get('goods_search');?>" placeholder="商品编号或商品名称" class="m-wrap small"></span>
            <span>供应商帐号或别名 <input type="text" name="username" value="<?php echo $this->input->get('username');?>" placeholder="供应商帐号或别名" class="m-wrap small"></span>
            <span>
                <select name="is_on_sale" class="m-wrap span8">
                    <option value="">上下架</option>
                    <option value="1" <?php if($this->input->get('is_on_sale')==1){echo 'selected';}?> >上架</option>
                    <option value="2" <?php if($this->input->get('is_on_sale')==2){echo 'selected';}?>>下架</option>
                </select>
            </span>
            <button class="btn green"><i class="icon-search"></i> 搜索</button>
        </form>
    </div>
    <?php if ($page_list->num_rows() > 0) :?>
        <table class="table table-striped table-bordered table-hover">
            <thead class="flip-content">
                <tr>
                    <th width="30">选择</th>
                    <th width="40">商品编号</th>
                    <th>商品名称</th>
                    <th>供应商</th>
                    <th>价格</th>
                    <th>库存</th>
                    <th>审核状态</th>
                    <th>上下架</th>
                    <th>更新时间</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($page_list->result() as $item) : ?>
                <tr>
                    <td><input type="radio" name="goods_id" value="<?php echo $item->goods_attr_id?>"></td>
                    <td width="80"><?php echo $item->goods_sn ?></td>
                    <td width="150">
                        <?php echo ($item->goods_native==2 ? '<strong>【特产】</strong>' : '').$item->goods_name ?>
                    </td>
                    <td>
                        <?php echo $item->user_name;?><p></p>
                        <?php echo $item->alias_name ?>
                    </td>
                    <td>
                        <p>售：<?php echo $item->shop_price ?></p>
                        <p>供：<?php echo $item->supply_price ?></p>
                    </td>
                    <td><?php echo $item->goods_num ?></td>
                    <td>
                            <?php echo $is_check[$item->is_check];?>
                    </td>
                    <td>
                        <a class="btn mini green" href="javascript:;" >
                            <?php echo $item->is_on_sale==1?'上架':'下架'; ?>
                        </a>
                    </td>
                    <td><?php echo $item->updated_at ?></td>
                </tr>
                <?php endforeach;?>
            </tbody>
        </table>
        <div class="dataTables_info">
            <span>当前第</span><span style="color: red"><?php echo $pg_now?></span>页 
            <span>共</span><span style="color: red"><?php echo $all_rows?></span>条数据
            <span>每页显示10条 </span>
            <?php echo $pg_list ?>
        </div>
    <?php else : ?>
        <div class="alert"><p>未找到数据。<p></div>
    <?php endif;?>
</div>
<div class="modal-footer"></div>